package cn.dxh.stagefinal.bean;


import java.util.List;

public class Commodity {

    private Integer id;
    //商品编码
    private String commCode;
    //条形码
    private String commBarCode;
    //商品名称
    private String commName;
    //品牌
    private Integer commBrand;
    private String commBrandStr;
    //商品类型
    private Integer commType;
    private String commTypeStr;
    //进货价格
    private double jhPrice;
    //成本价格
    private double cbPrice;
    //售价
    private double price;
    //库存
    private Integer stock;
    //销量
    private Integer sales;
    private Integer state;
    //容量
    private Double capacity;
    //重量
    private Double weight;
    //产地
    private String origin;
    //包装单位
    private String packingUnit;
    //销售渠道
    private List<SalesChannel> channelList;

    private CommBrand commBrandBean;
    private CommType commTypeBean;

    public String getCommBrandStr() {
        return commBrandStr;
    }

    public void setCommBrandStr(String commBrandStr) {
        this.commBrandStr = commBrandStr;
    }

    public String getCommTypeStr() {
        return commTypeStr;
    }

    public void setCommTypeStr(String commTypeStr) {
        this.commTypeStr = commTypeStr;
    }

    public Integer getCommBrand() {
        return commBrand;
    }

    public Integer getCommType() {
        return commType;
    }

    public void setCommBrand(Integer commBrand) {
        this.commBrand = commBrand;
    }

    public void setCommType(Integer commType) {
        this.commType = commType;
    }

    public CommBrand getCommBrandBean() {
        return commBrandBean;
    }

    public void setCommBrandBean(CommBrand commBrandBean) {
        this.commBrandBean = commBrandBean;
    }

    public CommType getCommTypeBean() {
        return commTypeBean;
    }

    public void setCommTypeBean(CommType commTypeBean) {
        this.commTypeBean = commTypeBean;
    }

    @Override
    public String toString() {
        return "Commodity{" +
                "id=" + id +
                ", commCode='" + commCode + '\'' +
                ", commBarCode='" + commBarCode + '\'' +
                ", commName='" + commName + '\'' +
                ", commBrand='" + commBrand + '\'' +
                ", commType='" + commType + '\'' +
                ", jhPrice=" + jhPrice +
                ", cbPrice=" + cbPrice +
                ", price=" + price +
                ", stock=" + stock +
                ", sales=" + sales +
                ", state=" + state +
                ", capacity=" + capacity +
                ", weight=" + weight +
                ", origin='" + origin + '\'' +
                ", packingUnit='" + packingUnit + '\'' +
                ", channelList=" + channelList +
                '}';
    }

    public List<SalesChannel> getChannelList() {
        return channelList;
    }

    public void setChannelList(List<SalesChannel> channelList) {
        this.channelList = channelList;
    }

    public Double getCapacity() {
        return capacity;
    }

    public void setCapacity(Double capacity) {
        this.capacity = capacity;
    }

    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public String getPackingUnit() {
        return packingUnit;
    }

    public void setPackingUnit(String packingUnit) {
        this.packingUnit = packingUnit;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }


    public String getCommCode() {
        return commCode;
    }

    public void setCommCode(String commCode) {
        this.commCode = commCode;
    }


    public String getCommBarCode() {
        return commBarCode;
    }

    public void setCommBarCode(String commBarCode) {
        this.commBarCode = commBarCode;
    }


    public String getCommName() {
        return commName;
    }

    public void setCommName(String commName) {
        this.commName = commName;
    }

    public double getJhPrice() {
        return jhPrice;
    }

    public void setJhPrice(double jhPrice) {
        this.jhPrice = jhPrice;
        this.cbPrice = jhPrice + 5;
        this.price = (this.cbPrice * 0.2) + this.cbPrice;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getCbPrice() {
        return cbPrice;
    }

    public void setCbPrice(double cbPrice) {
        this.cbPrice = cbPrice;
    }


    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }


    public Integer getSales() {
        return sales;
    }

    public void setSales(Integer sales) {
        this.sales = sales;
    }


    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

}
